import fetch from './fetch'

export default {
    PayRecord,
    AuthSignGetInfo,
    WhetherAuthSignGet,
    authSignPost,
    sale,
    recharge,
    transfer,
    withdraw,
    UpdateMobile,
    UpdateUserInfo,
    CreateOrder,
    GetOrderList,
    GetOrderDetail,
    ReplyOrderDetail,
    CartAdd,
    CartList,
    CartCount,
    UpdateUserPassword,
    UpdateUserEmail,
    WebSigning,
    ShareGet,
    BindBrokerageId,
    Validate,
    brokerageUser,
    webSigning,
    CartDelete,
    UserMobile
}

function PayRecord(options){
    return fetch({
        method:'post',
        path:'/web-api/trade/order/page',
        params:options
    });
}

function AuthSignGetInfo(options){
    return fetch({
        method:'get',
        path:'/web-api/member/webUserAuthSign/get',
        params:options
    });
}
function WhetherAuthSignGet(options){
    return fetch({
        method:'get',
        path:'/web-api/member/webUserAuthSign/exists',
        params:options
    });
}
//实名制
function authSignPost(options){
    return fetch({
        method:'post',
        path:'/web-api/member/webUserAuthSign/authSign',
        params:options
    });
}
//销售记录
function sale(options){
    return fetch({
        method:'post',
        path:'/web-api/trade/order/salePage',
        params:options
    });
}
//充值记录
function recharge(options){
    return fetch({
        method:'get',
        path:'/web-api/pay/wallet-recharge/page',
        params:options
    });
}
//提现记录
function transfer(options){
    return fetch({
        method:'get',
        path:'/web-api/trade/order-withdraw/page',
        params:options
    });
}
//提现
function withdraw(options){
    return fetch({
        method:'post',
        path:'/web-api/trade/order-withdraw/create',
        params:options
    });
}
//修改用户手机号
function UpdateMobile(options){
    return fetch({
        method:'put',
        path:'/web-api/member/user/update-mobile',
        params:options
    });
}
//修改用户信息
function UpdateUserInfo(options){
    return fetch({
        method:'put',
        path:'/web-api/member/user/update',
        params:options
    });
}
//修改用户密码
function UpdateUserPassword(options){
    return fetch({
        method:'put',
        path:'/web-api/member/user/update-password',
        params:options
    });
}
//修改用户邮箱
function UpdateUserEmail(options){
    return fetch({
        method:'put',
        path:'/web-api/member/user/update-email',
        params:options
    });
}
//创建工单
function CreateOrder(options){
    return fetch({
        method:'post',
        path:'/web-api/work/order/web-create',
        params:options
    });
}
//获取工单分页
function GetOrderList(options){
    return fetch({
        method:'get',
        path:'/web-api/work/order/web-page',
        params:options
    });
}
//获取工单详情
function GetOrderDetail(options){
    return fetch({
        method:'get',
        path:'/web-api/work/order/web-get',
        params:options
    });
}
//回复工单
function ReplyOrderDetail(options){
    return fetch({
        method:'post',
        path:'/web-api/work/order/web-recordSave',
        params:options
    });
}
function CartAdd(options){
    return fetch({
        method:'post',
        path:'/web-api/trade/cart/add',
        params:options
    });
}
//获取购物车列表
function CartList(options){
    return fetch({
        method:'get',
        path:'/web-api/trade/cart/list',
        params:options
    });
}
// 查询用户在购物车中的商品数量
function CartCount(options){
    return fetch({
        method:'get',
        path:'/web-api/trade/cart/get-count',
        params:options
    });
}
//签约
function WebSigning(options){
    return fetch({
        method:'post',
        path:'/web-api/member/webSigning/create',
        params:options
    });
}
function ShareGet(options){
    return fetch({
        method:'get',
        path:'/web-api/trade/brokerage-user/page',
        params:options
    });
}
//获取分销用户标识
function BindBrokerageId(options){
    return fetch({
        method:'get',
        path:'/web-api/trade/brokerage-user/bindBrokerageId',
        params:options
    });
}
//校验手机是否注册
function Validate(options){
    return fetch({
        method:'post',
        path:'/web-api/member/auth/validate-sms-code',
        params:options
    });
}
//绑定推广员
function brokerageUser(options){
    return fetch({
        method:'put',
        path:'/web-api/trade/brokerage-user/bind',
        params:options
    });
}
//判断用户是否签约
function webSigning(options){
    return fetch({
        method:'get',
        path:'/web-api/member/webSigning/get',
        params:options
    });
}
// 删除购物车商品
function CartDelete(options) {
    return fetch({
        method:'delete',
        path:'/web-api/trade/cart/delete',
        params:options
    });
}

// 效验手机号是否被占用
function UserMobile(options){
    return fetch({
        method:'put',
        path:'/web-api/member/user/mobile',
        params:options
    });
}